home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 July: Mac OS SDK / Dev.CD Jul 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Interfaces / AIncludes / CMMComponent.a < prev    next >
Encoding:
Text File  |  1996-01-24  |  7.8 KB  |  371 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        CMMComponent.a
  3. ;
  4. ;    Contains:    ColorSync CMM Components
  5. ;
  6. ;    Version:    Technology:    ColorSync 2.0
  7. ;                Package:    Universal Interfaces 2.2 in “MPW” on ETO #20
  8. ;
  9. ;    Copyright:    © 1984-1995 by Apple Computer, Inc.
  10. ;                All rights reserved.
  11. ;
  12. ;    Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13. ;                stack.  Include the file and version information (from above)
  14. ;                in the problem description and send to:
  15. ;                    Internet:    apple.bugs@applelink.apple.com
  16. ;                    AppleLink:    APPLE.BUGS
  17. ;
  18. ;
  19.  
  20.     IF &TYPE('__CMMCOMPONENT__') = 'UNDEFINED' THEN
  21. __CMMCOMPONENT__ SET 1
  22.  
  23.  
  24.     IF &TYPE('__TYPES__') = 'UNDEFINED' THEN
  25.     include 'Types.a'
  26.     ENDIF
  27. ;        include 'ConditionalMacros.a'                                ;
  28.  
  29.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  30.     include 'Quickdraw.a'
  31.     ENDIF
  32. ;        include 'MixedMode.a'                                        ;
  33. ;        include 'QuickdrawText.a'                                    ;
  34.  
  35.     IF &TYPE('__COMPONENTS__') = 'UNDEFINED' THEN
  36.     include 'Components.a'
  37.     ENDIF
  38.  
  39.     IF &TYPE('__CMAPPLICATION__') = 'UNDEFINED' THEN
  40.     include 'CMApplication.a'
  41.     ENDIF
  42. ;        include 'Files.a'                                            ;
  43. ;            include 'OSUtils.a'                                    ;
  44. ;                include 'Memory.a'                                    ;
  45. ;            include 'Finder.a'                                        ;
  46. ;        include 'Printing.a'                                        ;
  47. ;            include 'Errors.a'                                        ;
  48. ;            include 'Dialogs.a'                                    ;
  49. ;                include 'Menus.a'                                    ;
  50. ;                include 'Controls.a'                                ;
  51. ;                include 'Windows.a'                                ;
  52. ;                    include 'Events.a'                                ;
  53. ;                include 'TextEdit.a'                                ;
  54. ;        include 'CMICCProfile.a'                                    ;
  55.  
  56. CMMInterfaceVersion                EQU        1
  57.  
  58. ; Component function selectors 
  59. ; Required 
  60. kCMMInit                        EQU        0
  61. kNCMMInit                        EQU        6
  62. kCMMMatchColors                    EQU        1
  63. kCMMCheckColors                    EQU        2
  64.  
  65. ; Optional 
  66. kCMMValidateProfile                EQU        8
  67. kCMMFlattenProfile                EQU        14
  68. kCMMUnflattenProfile            EQU        15
  69. kCMMMatchBitmap                    EQU        9
  70. kCMMCheckBitmap                    EQU        10
  71. kCMMMatchPixMap                    EQU        3
  72. kCMMCheckPixMap                    EQU        4
  73. kCMMConcatenateProfiles            EQU        5
  74. kCMMConcatInit                    EQU        7
  75. kCMMNewLinkProfile                EQU        16
  76. kCMMGetPS2ColorSpace            EQU        11
  77. kCMMGetPS2ColorRenderingIntent    EQU        12
  78. kCMMGetPS2ColorRendering        EQU        13
  79. kCMMGetPS2ColorRenderingVMSize    EQU        17
  80.  
  81. ;
  82. ; pascal CMError NCMInit(ComponentInstance CMSession, CMProfileRef srcProfile, CMProfileRef dstProfile)
  83. ;
  84.     IF ¬ GENERATINGCFM THEN
  85.         Macro
  86.         _NCMInit
  87.             dc.w     $2F3C
  88.             dc.w     $0008
  89.             dc.w     $0006
  90.             moveq    #0,d0
  91.             dc.w     $A82A
  92.         EndM
  93.     ELSE
  94.         IMPORT_CFM_FUNCTION    NCMInit
  95.     ENDIF
  96.  
  97. ;
  98. ; pascal CMError CMInit(ComponentInstance CMSession, CMProfileHandle srcProfile, CMProfileHandle dstProfile)
  99. ;
  100.     IF ¬ GENERATINGCFM THEN
  101.         Macro
  102.         _CMInit
  103.             dc.w     $2F3C
  104.             dc.w     $0008
  105.             dc.w     $0000
  106.             moveq    #0,d0
  107.             dc.w     $A82A
  108.         EndM
  109.     ELSE
  110.         IMPORT_CFM_FUNCTION    CMInit
  111.     ENDIF
  112.  
  113. ;
  114. ; pascal CMError CMMatchColors(ComponentInstance CMSession, CMColor *myColors, unsigned long count)
  115. ;
  116.     IF ¬ GENERATINGCFM THEN
  117.         Macro
  118.         _CMMatchColors
  119.             dc.w     $2F3C
  120.             dc.w     $0008
  121.             dc.w     $0001
  122.             moveq    #0,d0
  123.             dc.w     $A82A
  124.         EndM
  125.     ELSE
  126.         IMPORT_CFM_FUNCTION    CMMatchColors
  127.     ENDIF
  128.  
  129. ;
  130. ; pascal CMError CMCheckColors(ComponentInstance CMSession, CMColor *myColors, unsigned long count, long *result)
  131. ;
  132.     IF ¬ GENERATINGCFM THEN
  133.         Macro
  134.         _CMCheckColors
  135.             dc.w     $2F3C
  136.             dc.w     $000C
  137.             dc.w     $0002
  138.             moveq    #0,d0
  139.             dc.w     $A82A
  140.         EndM
  141.     ELSE
  142.         IMPORT_CFM_FUNCTION    CMCheckColors
  143.     ENDIF
  144.  
  145. ; Optional functions 
  146. ;
  147. ; pascal CMError CMMValidateProfile(ComponentInstance CMSession, CMProfileRef prof, Boolean *valid)
  148. ;
  149.     IF ¬ GENERATINGCFM THEN
  150.         Macro
  151.         _CMMValidateProfile
  152.             dc.w     $2F3C
  153.             dc.w     $0008
  154.             dc.w     $0008
  155.             moveq    #0,d0
  156.             dc.w     $A82A
  157.         EndM
  158.     ELSE
  159.         IMPORT_CFM_FUNCTION    CMMValidateProfile
  160.     ENDIF
  161.  
  162. ;
  163. ; pascal CMError CMMFlattenProfile(ComponentInstance CMSession, CMProfileRef prof, unsigned long flags, CMFlattenUPP proc, void *refCon)
  164. ;
  165.     IF ¬ GENERATINGCFM THEN
  166.         Macro
  167.         _CMMFlattenProfile
  168.             dc.w     $2F3C
  169.             dc.w     $0010
  170.             dc.w     $000E
  171.             moveq    #0,d0
  172.             dc.w     $A82A
  173.         EndM
  174.     ELSE
  175.         IMPORT_CFM_FUNCTION    CMMFlattenProfile
  176.     ENDIF
  177.  
  178. ;
  179. ; pascal CMError CMMUnflattenProfile(ComponentInstance CMSession, FSSpec *resultFileSpec, CMFlattenUPP proc, void *refCon)
  180. ;
  181.     IF ¬ GENERATINGCFM THEN
  182.         Macro
  183.         _CMMUnflattenProfile
  184.             dc.w     $2F3C
  185.             dc.w     $000C
  186.             dc.w     $000F
  187.             moveq    #0,d0
  188.             dc.w     $A82A
  189.         EndM
  190.     ELSE
  191.         IMPORT_CFM_FUNCTION    CMMUnflattenProfile
  192.     ENDIF
  193.  
  194. ;
  195. ; pascal CMError CMMatchBitmap(ComponentInstance CMSession, const CMBitmap *bitmap, CMBitmapCallBackUPP progressProc, void *refCon, CMBitmap *matchedBitmap)
  196. ;
  197.     IF ¬ GENERATINGCFM THEN
  198.         Macro
  199.         _CMMatchBitmap
  200.             dc.w     $2F3C
  201.             dc.w     $0010
  202.             dc.w     $0009
  203.             moveq    #0,d0
  204.             dc.w     $A82A
  205.         EndM
  206.     ELSE
  207.         IMPORT_CFM_FUNCTION    CMMatchBitmap
  208.     ENDIF
  209.  
  210. ;
  211. ; pascal CMError CMCheckBitmap(ComponentInstance CMSession, const CMBitmap *bitmap, CMBitmapCallBackUPP progressProc, void *refCon, CMBitmap *resultBitmap)
  212. ;
  213.     IF ¬ GENERATINGCFM THEN
  214.         Macro
  215.         _CMCheckBitmap
  216.             dc.w     $2F3C
  217.             dc.w     $0010
  218.             dc.w     $000A
  219.             moveq    #0,d0
  220.             dc.w     $A82A
  221.         EndM
  222.     ELSE
  223.         IMPORT_CFM_FUNCTION    CMCheckBitmap
  224.     ENDIF
  225.  
  226. ;
  227. ; pascal CMError CMMatchPixMap(ComponentInstance CMSession, PixMap *myPixMap, CMBitmapCallBackUPP progressProc, void *refCon)
  228. ;
  229.     IF ¬ GENERATINGCFM THEN
  230.         Macro
  231.         _CMMatchPixMap
  232.             dc.w     $2F3C
  233.             dc.w     $000C
  234.             dc.w     $0003
  235.             moveq    #0,d0
  236.             dc.w     $A82A
  237.         EndM
  238.     ELSE
  239.         IMPORT_CFM_FUNCTION    CMMatchPixMap
  240.     ENDIF
  241.  
  242. ;
  243. ; pascal CMError CMCheckPixMap(ComponentInstance CMSession, const PixMap *myPixMap, CMBitmapCallBackUPP progressProc, BitMap *myBitMap, void *refCon)
  244. ;
  245.     IF ¬ GENERATINGCFM THEN
  246.         Macro
  247.         _CMCheckPixMap
  248.             dc.w     $2F3C
  249.             dc.w     $0010
  250.             dc.w     $0004
  251.             moveq    #0,d0
  252.             dc.w     $A82A
  253.         EndM
  254.     ELSE
  255.         IMPORT_CFM_FUNCTION    CMCheckPixMap
  256.     ENDIF
  257.  
  258. ;
  259. ; pascal CMError CMConcatInit(ComponentInstance CMSession, CMConcatProfileSet *profileSet)
  260. ;
  261.     IF ¬ GENERATINGCFM THEN
  262.         Macro
  263.         _CMConcatInit
  264.             dc.w     $2F3C
  265.             dc.w     $0004
  266.             dc.w     $0007
  267.             moveq    #0,d0
  268.             dc.w     $A82A
  269.         EndM
  270.     ELSE
  271.         IMPORT_CFM_FUNCTION    CMConcatInit
  272.     ENDIF
  273.  
  274. ;
  275. ; pascal CMError CMNewLinkProfile(ComponentInstance CMSession, CMProfileRef *prof, const CMProfileLocation *targetLocation, CMConcatProfileSet *profileSet)
  276. ;
  277.     IF ¬ GENERATINGCFM THEN
  278.         Macro
  279.         _CMNewLinkProfile
  280.             dc.w     $2F3C
  281.             dc.w     $000C
  282.             dc.w     $0010
  283.             moveq    #0,d0
  284.             dc.w     $A82A
  285.         EndM
  286.     ELSE
  287.         IMPORT_CFM_FUNCTION    CMNewLinkProfile
  288.     ENDIF
  289.  
  290. ;
  291. ; pascal CMError CMMGetPS2ColorSpace(ComponentInstance CMSession, CMProfileRef srcProf, unsigned long flags, CMFlattenUPP proc, void *refCon)
  292. ;
  293.     IF ¬ GENERATINGCFM THEN
  294.         Macro
  295.         _CMMGetPS2ColorSpace
  296.             dc.w     $2F3C
  297.             dc.w     $0010
  298.             dc.w     $000B
  299.             moveq    #0,d0
  300.             dc.w     $A82A
  301.         EndM
  302.     ELSE
  303.         IMPORT_CFM_FUNCTION    CMMGetPS2ColorSpace
  304.     ENDIF
  305.  
  306. ;
  307. ; pascal CMError CMMGetPS2ColorRenderingIntent(ComponentInstance CMSession, CMProfileRef srcProf, unsigned long flags, CMFlattenUPP proc, void *refCon)
  308. ;
  309.     IF ¬ GENERATINGCFM THEN
  310.         Macro
  311.         _CMMGetPS2ColorRenderingIntent
  312.             dc.w     $2F3C
  313.             dc.w     $0010
  314.             dc.w     $000C
  315.             moveq    #0,d0
  316.             dc.w     $A82A
  317.         EndM
  318.     ELSE
  319.         IMPORT_CFM_FUNCTION    CMMGetPS2ColorRenderingIntent
  320.     ENDIF
  321.  
  322. ;
  323. ; pascal CMError CMMGetPS2ColorRendering(ComponentInstance CMSession, CMProfileRef srcProf, CMProfileRef dstProf, unsigned long flags, CMFlattenUPP proc, void *refCon)
  324. ;
  325.     IF ¬ GENERATINGCFM THEN
  326.         Macro
  327.         _CMMGetPS2ColorRendering
  328.             dc.w     $2F3C
  329.             dc.w     $0014
  330.             dc.w     $000D
  331.             moveq    #0,d0
  332.             dc.w     $A82A
  333.         EndM
  334.     ELSE
  335.         IMPORT_CFM_FUNCTION    CMMGetPS2ColorRendering
  336.     ENDIF
  337.  
  338. ;
  339. ; pascal CMError CMMGetPS2ColorRenderingVMSize(ComponentInstance CMSession, CMProfileRef srcProf, CMProfileRef dstProf, unsigned long *vmSize)
  340. ;
  341.     IF ¬ GENERATINGCFM THEN
  342.         Macro
  343.         _CMMGetPS2ColorRenderingVMSize
  344.             dc.w     $2F3C
  345.             dc.w     $000C
  346.             dc.w     $0011
  347.             moveq    #0,d0
  348.             dc.w     $A82A
  349.         EndM
  350.     ELSE
  351.         IMPORT_CFM_FUNCTION    CMMGetPS2ColorRenderingVMSize
  352.     ENDIF
  353.  
  354. ;
  355. ; pascal CMError CMConcatenateProfiles(ComponentInstance CMSession, CMProfileHandle thru, CMProfileHandle dst, CMProfileHandle *newDst)
  356. ;
  357.     IF ¬ GENERATINGCFM THEN
  358.         Macro
  359.         _CMConcatenateProfiles
  360.             dc.w     $2F3C
  361.             dc.w     $000C
  362.             dc.w     $0005
  363.             moveq    #0,d0
  364.             dc.w     $A82A
  365.         EndM
  366.     ELSE
  367.         IMPORT_CFM_FUNCTION    CMConcatenateProfiles
  368.     ENDIF
  369.  
  370.     ENDIF ; __CMMCOMPONENT__
  371.